package com.bert.task;

import com.bert.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


/**
 * @author bert
 */
@Slf4j
//@Component
public class DoTask {

//    @DubboReference
    @DubboReference(loadbalance = "roundrobin")
    private TestService testService;

    @Scheduled(cron = "0/1 * * * * ?")
    public void run() {
        log.info(testService.getTest("Dubbo"));
    }

}
